Chi-square Formula:
From: | To: |
The Chi-square goodness of fit test determines whether sample data matches a population with a specific distribution. It compares observed counts with expected counts to see if differences are statistically significant.
The calculator uses the Chi-square formula:
Where:
Explanation: The test measures how much the observed counts deviate from the expected counts under the null hypothesis.
Details: A large chi-square statistic relative to the degrees of freedom suggests the observed data doesn't fit the expected distribution.
Tips: Enter observed counts as comma-separated values. For expected values, you can enter either counts or proportions (they must sum to 1 if proportions).
Q1: What are the assumptions of this test?
A: The test assumes random sampling, independence of observations, and that expected counts are ≥5 in each category.
Q2: How do I interpret degrees of freedom?
A: Degrees of freedom equal the number of categories minus one minus the number of estimated parameters.
Q3: What's the difference between goodness of fit and test of independence?
A: Goodness of fit compares observed to expected counts in one variable, while test of independence examines relationship between two variables.
Q4: What if my expected counts are too small?
A: For small expected counts (<5), consider combining categories or using exact tests like Fisher's exact test.
Q5: How is the p-value calculated?
A: The p-value is the probability under the chi-square distribution with the calculated degrees of freedom of obtaining a value as extreme as the observed chi-square statistic.